<template>
  <div class="programlist">
    <div class="title flex">
      <h2>{{ title }}</h2>
      <div>更多<span>></span></div>
    </div>
    <div class="listtop">
      <div class="list flex" v-for="(item,index) in arr" :key="index">
        <div class="rank">
            <h3>{{index+1}}</h3>
            <p></p>
        </div>
        <div class="png">
          <img :src="item.program.blurCoverUrl" alt="" />
        </div>
        <div class="txt">
          <h3>
            {{ item.program.name }}
          </h3>
          <p>{{ item.program.radio.name }}</p>
        </div>
        <div class="box"></div>
      </div>
    </div>
  </div>
</template>
 
<script>
export default {
  props: ["arr", "title"],
  data() {
    return {};
  },
};
</script>
 
<style lang = "less" scoped>
.programlist {
  width: 426px;
  .title {
    margin-left: 38px;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-bottom: 2px solid #c20c0c;
    padding-bottom: 10px;
    h2 {
      color: #333;
      font-size: 24px;
      &:hover {
        text-decoration: underline;
      }
    }
    div {
      color: #666;
      &:hover {
        text-decoration: underline;
      }
    }
  }
  .listtop {
    border: 1px solid #ccc;
    padding-left: 10px;
    box-sizing: border-box;
    overflow: hidden;
    margin-left: 38px;
  }
  .list {
    margin-left: 20px;
    padding: 8px 0;
    .png {
      img {
        height: 40px;
        width: 40px;
      }
    }
    width: 424px;
    justify-content: space-between;
    margin-top: 10px;
    align-items: center;
    .txt {
      line-height: 20px;
      width: 254px;
      h3 {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 1;
        overflow: hidden;
        box-sizing: border-box;
        color: #333;
      }
      p {
        color: #999;
      }
    }
    .box {
      margin-right: 30px;
      height: 18px;
      width: 62px;
      background: url("https://s2.music.126.net/style/web2/img/table.png?38e2c4bfaddcc9592cb9e26380cfdf14")
        no-repeat;
      background-position: 0 -240px;
    }
  }
}
</style>